home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / batch / library / batutl2 / checking.asm < prev    next >
Assembly Source File  |  1988-04-20  |  1KB  |  51 lines

  1. TITLE    CHECKING    1-17-83    [4-15-88]
  2. ;Toad Hall disassembly, tweak
  3.  
  4. LF    EQU    0AH
  5. CR    EQU    0DH
  6. ;
  7. ;INITIAL VALUES :    CS:IP    0000:0100
  8. ;            SS:SP    0000:FFFF
  9.  
  10. CodeSeg    SEGMENT
  11.     ASSUME DS:CodeSeg, SS:CodeSeg ,CS:CodeSeg ,ES:CodeSeg
  12.     ORG    100H
  13.  
  14. Checking    proc    far
  15.     JMP    SHORT    Start
  16.  
  17. ;    NOP
  18. ;L0103      L015B DR
  19. L0103    dw    0001H        ;offset
  20.     dw    0050H        ;segment
  21.  
  22. ErrMsg_107    DB    'Errors encountered - breaking batch job.$'
  23. NoErrMsg_130    DB    'No errors - continuing with batch job.$'
  24.  
  25. Start:
  26. ;I don't LIKE returning to DOS this way...
  27. ;    PUSH    DS            ;seg for return to batch job
  28. ;    XOR    AX,AX            ;ofs 0
  29. ;    PUSH    AX
  30. ;    LES    DH,DWORD PTR L0103    MASM 5.0 won't let you do this
  31.     les    dx,dword ptr L0103
  32.     CMP    BYTE PTR ES:[SI],0
  33.     JNZ    GotError        ;got an error
  34.      MOV    DX,OFFSET NoErrMsg_130    ;'no errors'
  35.      MOV    AH,9            ;display string
  36.      INT    21H
  37. ;     RET_FAR            ; to batch
  38.      mov    ax,4C00H        ;terminate, Errorlevel = 0
  39.      int    21H
  40.  
  41. GotError:
  42.     MOV    DX,OFFSET ErrMsg_107    ;'errors, breaking batch'
  43.     MOV    AH,9            ;display string
  44.     INT    21H
  45.     INT    23H            ;return to DOS
  46. Checking    endp
  47.  
  48.     CodeSeg    ENDS
  49. ;
  50. END    Checking
  51.